package com.atguigu.spzx.product.controller;

import com.atguigu.spyx.model.common.Result;
import com.atguigu.spyx.model.common.com.atguigu.spyx.model.entity.product.Brand;
import com.atguigu.spzx.product.service.BrandService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author LT
 * @create 2023-11-18-8:34
 */
@RestController
@RequestMapping("/api/product/brand")
public class BrandController {

    @Resource
    BrandService brandService;


    @GetMapping("findAll")
    public Result findAll(){

       List<Brand> brandList = brandService.findAll();
        return  Result.ok().data(brandList);
    }

}
